<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link href="/css/layui.css" rel="stylesheet">
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
						<input id="id" name="id" th:value="${payProperty.id}"  type="hidden">
							<div class="form-group">	
								<label class="col-sm-3 control-label">支付公司：</label>
								<div class="col-sm-8">
									<select id="payCompany" name="payCompany" class="form-control" onfocus = "this.defaultIndex=this.selectedIndex;" 
											onchange="this.selectedIndex=this.defaultIndex;">
										<option th:each="payCompany:${payCompanys}" th:value="${payCompany.key}" th:text="${payCompany.value}"
										th:if="${payCompany.key eq payProperty.payCompany}" th:selected="selected"></option>
									</select>
								</div>
							</div>
														<div class="form-group">	
								<label class="col-sm-3 control-label">商户号：</label>
								<div class="col-sm-8">
									<input id="merchantno" name="merchantno" th:value="${payProperty.merchantno}" class="form-control" type="text" readonly="readonly">
								</div>
							</div>
							<div class="form-group">	
								<label class="col-sm-3 control-label">配置标识：</label>
								<div class="col-sm-8">
									<input id="configKey" name="configKey" th:value="${payProperty.configKey}" class="form-control" type="text" readonly="readonly" maxlength="30">
								</div>
							</div>
							<div class="form-group">	
								<label class="col-sm-3 control-label"> 配置类型：</label>
								<div class="col-sm-8">
									<label th:each="payConfigType:${payConfigTypes}" class="radio-inline">
										<input name="configType" type="radio" th:value="${payConfigType.key}"
										th:text="${payConfigType.value}" th:if="${payConfigType.key eq payProperty.configType}" th:checked="checked">
									</label>
								</div>
							</div>
							<div id="divFileUpload" class="form-group" style="display: none;" >
								<button type="button" class="layui-btn" id="keyFileUpload" style="width: 100px;margin-left: 12.5%">
		                            <i class="fa fa-cloud"></i>上传文件
		                        </button><a id="fileName" style="color: green;padding-left: 10px" th:href = "@{'/files/'+${payProperty.value}}" th:text="${payProperty.value}"></a>
		                        <input type="hidden" id="fileUploadValue" th:value="${payProperty.value}">
							</div>
							<div id="divConfigValue" class="form-group">	
								<label class="col-sm-3 control-label">值：</label>
								<div class="col-sm-8">
									<input id="value" name="value" th:value="${payProperty.value}" class="form-control" type="text" maxlength="80">
								</div>
							</div>
							
							<div class="form-group">	
								<label class="col-sm-3 control-label">名称说明：</label>
								<div class="col-sm-8">
									<input id="name" name="name" th:value="${payProperty.name}" class="form-control" maxlength="50" type="text">
								</div>
							</div>
																					<div class="form-group">
								<div class="col-sm-8 col-sm-offset-3">
									<button type="submit" class="btn btn-primary">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
	</div>
	</div>
	<script th:inline="javascript">
	/*<![CDATA[*/
	    var payCompanys = [[${payCompanys}]];
	    var payConfigTypes = [[${payConfigTypes}]];
	/*]]>*/
	</script>
	<div th:include="include::footer"></div>
	<script type="text/javascript" src="/js/layui.js"></script>
	<script type="text/javascript" src="/js/appjs/pay/payProperty/edit.js">
	</script>
</body>
</html>
